<template>
  <work-template @closeSelectedTag="closeSelectedTag" @submitOn="submitOn" :butShow="true">
    <div slot="form">
      <!--主订单-->
      <mainOrder v-model="ruleForm"/>
      <!--退保台数-->
      <cancellationNumber v-model="ruleForm" state="write" ref="refCancellationNumber"/>
    </div>
  </work-template>
</template>

<script>
export default {
  name: 'DeliveryVehicleEdit',
  components: {
    //主订单
    mainOrder: () => import('./components/mainOrder.vue'),
    //退保台数
    cancellationNumber: () => import('./components/cancellationNumber.vue'),
  },
  computed: {},
  watch: {},
  data() {
    return {
      ruleForm: {
        tableData: [{carNo: '豫C213R91'}]
      }
    };
  },
  created() {
  },
  mounted() {
  },
  methods: {
    submitOn() {
      this.$refs.refCancellationNumber.handleEffect().then(() => {
        const loading = this.$loading({
          lock: true,
          text: "保存中",
          spinner: "el-icon-loading",
          background: "rgba(0, 0, 0, 0.7)",
        });
      }).catch()
    },

    closeSelectedTag() {
      this.$tab.closePage().then(({visitedViews}) => {
        this.$router.push({
          path: "/vehicleOrder/orderManagement/DeliveryVehicleList",
        });
      });
    }
  },
};
</script>

<style scoped lang=""></style>


